package com.example.bijiabao.mapper;

import com.example.bijiabao.entity.book;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface indexMapper {
    @Select("select * from book ")
    List<book> findAllbook();
    //首页查询全部商品后排序（查)

@Select("select * from book order by  bookComNum desc ")
    List<book> findAllbookbycomnum();
//首页商品按评论数排序

//首页热销榜
@Select("select * from book order by  bookComNum desc limit 4")
List<book> findhotbook();
}
